# Contributor: Michael Truog <mjtruog@gmail.com>
# Maintainer: Michael Truog <mjtruog@gmail.com>

pkgname=tsung
pkgver=1.8.0
pkgrel=2
pkgdesc="Tsung is a high-performance benchmark framework for various protocols including HTTP,XMPP,LDAP,etc."
url="https://www.process-one.net/en/tsung/"
options="!check" # Tests fail on CI
license="GPL-2.0-or-later"
arch="noarch"
depends="bash
	erlang
	gnuplot
	perl-template-toolkit
	python3
	py3-matplotlib>=1.5.1-r3
	"
makedepends="
	erlang-dev
	perl
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/processone/tsung/archive/v$pkgver.tar.gz
	0005-Do-not-install-manpages-in-main-install.patch
	"

build() {
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--host="$CHOST" \
		--build="$CBUILD"
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
3afddd5cd427e75831efca034b9f88147e4a583ab9eb9ad8675d1db583ce1f61850ab9b21a0a25748b807e9ac8a647d446335b0ae5411e0746fc2cb1c73a47e3  tsung-1.8.0.tar.gz
c6876e80b612a88c01c9971d3581f23b0145d274ca4354963c145f059bfd5f02969fc1a8ab35cd9fa1c567afd37004c34bc68834c050868d9c2da308de82bfa6  0005-Do-not-install-manpages-in-main-install.patch
"
